using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class ATL_PaymentsMap : EntityTypeConfiguration<ATL_Payments>
    {
        public ATL_PaymentsMap()
        {
            // Primary Key
            this.HasKey(t => t.ID);

            // Properties
            this.Property(t => t.voucher)
                .HasMaxLength(10);

            this.Property(t => t.origin)
                .HasMaxLength(10);

            // Table & Column Mappings
            this.ToTable("ATL_Payments");
            this.Property(t => t.ID).HasColumnName("ID");
            this.Property(t => t.Number).HasColumnName("Number");
            this.Property(t => t.Action_date).HasColumnName("Action_date");
            this.Property(t => t.Date).HasColumnName("Date");
            this.Property(t => t.Type).HasColumnName("Type");
            this.Property(t => t.old_Amount).HasColumnName("old_Amount");
            this.Property(t => t.new_Amount).HasColumnName("new_Amount");
            this.Property(t => t.User).HasColumnName("User");
            this.Property(t => t.voucher).HasColumnName("voucher");
            this.Property(t => t.Action).HasColumnName("Action");
            this.Property(t => t.origin).HasColumnName("origin");
        }
    }
}
